<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Branching for a GCC Release</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<body>
<p>This page documents the procedure for making a new release branch.</p>

<h2>Preparations</h2>

<ol>
<li>Execute the following command, in a checkout of master, substituting appropriate version 
numbers:
<blockquote>
<pre>
git push origin master:releases/gcc-10
</pre>
</blockquote>
</li>

<li>Update the file <code>gcc/DEV-PHASE</code> on the branch, to say
&quot;prerelease&quot; instead of &quot;experimental&quot;.</li>

<li>Update the file <code>gcc/BASE-VER</code> on the mainline, to use
the next major release number (e.g., 11 instead of 10).  Immediately
after pushing that change, create the basepoint tag for the next release:
<blockquote>
<pre>
git tag -a -m "GCC 11 basepoint" basepoints/gcc-11
git push origin tag basepoints/gcc-11
</pre>
</blockquote>
</li>

<li>Create a new <code>htdocs/gcc-<var>VERSION</var></code> directory
for the next major release in the <code>wwwdocs</code> repository and
populate it with initial copies of <code>changes.html</code> and
<code>criteria.html</code>.</li>

<li>Notify libstdc++ maintainers to update references to "mainline GCC" in
<code>libstdc++-v3/doc/xml/manual/status_cxx*.xml</code>.</li>
</ol>

<h2>Web Site Updates</h2>

<ol start="6">
<li>Add <code>index.html</code> and <code>changes.html</code> pages
based on the previous release branch to the directory corresponding to
the newly created release branch.</li>
	
<li>Add <code>buildstat.html</code> and update the toplevel
<code>buildstat.html</code> accordingly.</li>

<li>Update the toplevel <code>index.html</code> page to show the new active
release branch, the current release series, and active development
(mainline).  Update the version and development stage for mainline.</li>
</ol>

<ol start="9">
<li>Update <code>maintainer-scripts/crontab</code> on the mainline by
adding an entry to make snapshots of the new branch and adjusting the
version number of the mainline snapshots.
Run <code>git pull</code> in the <code>gcc-checkout</code> directory of
the gccadmin account, and then actually install the updated crontab
there.
<br />
Generate the next mainline snapshot manually, using the <code>-p</code>
option of the <code>gcc_release</code> script.  For that single run,
adjust the script such that the announcement mail is sent to you
personally so that you can adjust references to the previous snapshot
in the  <code>README</code> and <code>index.html</code> files of the
new snapshot as well as the mail itself before relaying it.
</li>

<li><a href="translation.html#regen">Regenerate
<code>gcc.pot</code></a> and <code>cpplib.pot</code>.
<a href="translation.html#submit">Send them
to the translation project</a> if no snapshot of this version was sent
during development stage 3 or 4.</li>
</ol>

<h2>Bugzilla Updates</h2>

<ol start="11">
<li>Create new versions in Bugzilla corresponding to the new mainline 
version.  This can be accomplished by choosing "products", choosing "gcc", 
and editing the versions.  Please do <strong>not</strong> delete old
versions.</li>

<li>Create new target milestones in Bugzilla corresponding to the new 
mainline version.  This can be accomplished by choosing "products", 
choosing "gcc", and editing the milestones.  Please do <strong>not</strong>
delete old target milestones.</li>

<li>Create new target milestones in Bugzilla for the second dot
release on the branch.  For example, when branching 3.4, create a
milestone for 3.4.1 for PRs that can't be fixed in time for 3.4.0.</li>

<li>Bug regression summary needs to adjusted by <code>maintainer-scripts/branch_changer.py</code> with the following arguments:

<blockquote><pre>
./maintainer-scripts/branch_changer.py api_key --add=11:12
</pre></blockquote>

The script adds '/12' to all PRs marked with a '[Regression x/y/z]' summary line.
(Unless you add <strong>--doit</strong>, the script runs in dry mode only.)
</li>
</ol>

</body>
</html>
